package com.xudm.cdg.entity.system;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 文件生成记录
 * </p>
 *
 * @author xudm
 * @since 2024-06-20
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_cdg_file_generation_record")
public class FileGenerationRecord extends Model<FileGenerationRecord> {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 源文件名
     */
    @TableField("origin_file_name")
    private String originFileName;

    /**
     * 源文件hash值
     */
    @TableField("origin_file_hash_value")
    private String originFileHashValue;

    /**
     * 生成文件地址
     */
    @TableField("generate_file_address")
    private String generateFileAddress;

    /**
     * 生成标识
     */
    @TableField("gen_flag")
    private int genFlag;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    /**
     * 更新人
     */
    @TableField(value = "updated_by", fill = FieldFill.INSERT_UPDATE)
    private String updatedBy;

    /**
     * 更新时间
     */
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    public static final String ID = "id";

    public static final String ORIGIN_FILE_NAME = "origin_file_name";

    public static final String ORIGIN_FILE_HASH_VALUE = "origin_file_hash_value";

    public static final String GENERATE_FILE_ADDRESS = "generate_file_address";

    public static final String CREATED_BY = "created_by";

    public static final String CREATED_TIME = "created_time";

    public static final String UPDATED_BY = "updated_by";

    public static final String UPDATED_TIME = "updated_time";

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
